import request from '@/server'

// 获得轮播图列表
export function getBannerListApi() {
  return request.get({
    url: '/home/banners'
  })
}

// 新增轮播图
export function addBannerApi(data: any) {
  return request.post({
    url: '/admin/home/addBannesr',
    data
  })
}

// 删除轮播图
export function deleteBannerApi(id: number) {
  return request.delete({
    url: `/admin/home/deleteBanner?id=${id}`
  })
}

// 修改轮播图
export function updateBannerApi(data: any) {
  return request.post({
    url: '/admin/home/editBanner',
    data
  })
}
